package com.core.reach.cloudhub.service;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * @author ga.zhang
 * @version V1.0
 * @description: TODO
 * @date 2020/3/26 9:42
 **/
@Component
@FeignClient(value = "CLOUD-PROVIDER-HYSTRIX-PAYMENT",fallback = PaymentFallbackServiceImpl.class)
public interface PaymentHystrixService {

    /**
     * ok
     * @param id id
     * @return String
     */
    @GetMapping("/hystrix/ok/{id}")
    public String paymentInfoOk(@PathVariable("id") Long id);

    /**
     * timeOut
     * @param id id
     * @return String
     */
    @GetMapping("/hystrix/timeout/{id}")
    public String paymentInfoTimeOut(@PathVariable("id") Long id);

}
